﻿<UserControl x:Class="SmartLib.UiTests.UiComponents.InputControls.AutoCompleteTextBoxTestsView"
			 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
			 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
			 xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
			 xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
			 xmlns:test="clr-namespace:SmartLib.UiTests.UiComponents.InputControls" 
			 xmlns:ctrl="clr-namespace:SmartLib.UiComponents.InputControls;assembly=SmartLib.UiComponents" 
			 mc:Ignorable="d" d:DesignHeight="480" d:DesignWidth="640">
	<UserControl.DataContext>
		<test:AutoCompleteTextBoxTestsViewModel/>
	</UserControl.DataContext>
	<Grid Background="LightBlue">
		<Grid.ColumnDefinitions>
			<ColumnDefinition Width="Auto"/>
			<ColumnDefinition/>
		</Grid.ColumnDefinitions>
		<Grid.RowDefinitions>
			<RowDefinition Height="Auto"/>
			<RowDefinition Height="Auto"/>
		</Grid.RowDefinitions>

		<StackPanel Grid.Column="1" Width="200" Background="{Binding ElementName=txt1, Path=SelectedItem.Source}"
			  HorizontalAlignment="Left">
			<TextBlock Text="{Binding ElementName=txt1, Path=SelectedValue, StringFormat='ID: {0}'}"/>
			<TextBlock Text="{Binding ElementName=txt1, Path=SelectedItem.Name, StringFormat='Name: {0}'}"/>
		</StackPanel>

		<TextBlock Grid.Row="1" Text="Color:" VerticalAlignment="Center" Margin="2" HorizontalAlignment="Right"/>
		<ctrl:AutoCompleteTextBox Grid.Row="1" Grid.Column="1" VerticalAlignment="Center" Width="200" FontSize="14" HorizontalAlignment="Left"
				Text="{Binding Text}" HintText="{Binding HintText}" HintItems="{Binding HintItems}" Margin="2" x:Name="txt1"
				DisplayMemberPath="Name" SelectedValuePath="Id"/>			
	</Grid>
</UserControl>
